import Vue from 'vue'
import Poster from '@/create-api/poster'
import Media from '@/create-api/media'
import Coupon from "@/create-api/coupon"
import Links from "./create-api/links"
import Attention from "./create-api/Attention";
import Question from "./create-api/question"
import CouponDetail from "./create-api/coupon-detail"
import FormManage from "./create-api/form-manage"
import RedForm from "./create-api/red-form"
import Subscribe from "./create-api/subscribe"

// By default we import all the components.
// Only reserve the components on demand and remove the rest.
// Style is always required.
import {
  /* eslint-disable no-unused-vars */
  Style,
  // basic
  Button,
//  Loading,
//  Tip,
// Toolbar,
//  TabBar,
//  TabPanels,
  // form
  Checkbox,
  CheckboxGroup,
//  Checker,
  Radio,
  RadioGroup,
  Input,
  Textarea,
//  Select,
//  Switch,
//  Rate,
  Validator,
//  Upload,
  Form,
  // popup
//  Popup,
  Toast,
  Picker,
  CascadePicker,
  DatePicker,
  TimePicker,
//  SegmentPicker,
  Dialog,
  ActionSheet,
//  Drawer,
//  ImagePreview,
  // scroll
  Scroll,
  Slide,
//  IndexList,
//  Swipe,
//  Sticky,
//  ScrollNav,
  ScrollNavBar,
  createAPI
} from 'cube-ui'

Vue.use(Button)
// Vue.use(Loading)
// Vue.use(Tip)
// Vue.use(Toolbar)
// Vue.use(TabBar)
// Vue.use(TabPanels)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
// Vue.use(Checker)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Input)
Vue.use(Textarea)
// Vue.use(Select)
// Vue.use(Switch)
// Vue.use(Rate)
Vue.use(Validator)
// Vue.use(Upload)
Vue.use(Form)
// Vue.use(Popup)
Vue.use(Toast)
Vue.use(Picker)
Vue.use(CascadePicker)
Vue.use(DatePicker)
Vue.use(TimePicker)
// Vue.use(SegmentPicker)
Vue.use(Dialog)
Vue.use(ActionSheet)
// Vue.use(Drawer)
// Vue.use(ImagePreview)
Vue.use(Scroll)
Vue.use(Slide)
// Vue.use(IndexList)
// Vue.use(Swipe)
// Vue.use(Sticky)
// Vue.use(ScrollNav)
Vue.use(ScrollNavBar)

// 自定义组件 createAPI
/**
 * 红包码，海报
 */
createAPI(Vue, Poster,["click"],true)
/**
 * 素材库
 */
createAPI(Vue, Media,["confirm"])
/**
 * 卡券管理
 */
createAPI(Vue,Coupon,["confirm"])
/**
 * 链接管理
 */
createAPI(Vue,Links,["confirm"],true)
/**
 * 关注公众号
 */
createAPI(Vue,Attention,["close"],true)
/**
 * 选择题
 */
createAPI(Vue,Question,["confirm","close","reset"],true)
/**
 * 卡券详情
 */
createAPI(Vue,CouponDetail,["close"],true)
/**
 * 万能表单
 */
createAPI(Vue,FormManage,["close","confirm"],true)

/**
 * 红包表单
 */
createAPI(Vue,RedForm,["close","success"],true)

/**
 * 订阅消息弹窗
 */
createAPI(Vue,Subscribe,[],true);